import http from '@/base/http';

/**
 * 搜索管理
 */
enum SEARCH_API {
  SEARCH_LIST = '/userSearchRecord/page', // 搜索列表
  SEARCH_LOG = '/wx/userSearchRecord/page', // 搜索日志
  SEARCH_LOG_CREATE = '/wx/userSearchRecord/create', // 新增搜索
}

/**
 * 搜索列表
 */
export function fetchSearchList(data: unknown): Promise<any> {
  return http.get(SEARCH_API.SEARCH_LIST, data);
}

/*
/** 搜索日志
 */
export function fetchSearchLogList(data: unknown): Promise<any> {
  return http.get(SEARCH_API.SEARCH_LOG, data);
}

export function createSearchLog(data: unknown): Promise<any> {
  return http.post(SEARCH_API.SEARCH_LOG_CREATE, data);
}
